import React from 'react'
import ReactDOM from 'react-dom/client'

function App() {
  debugger
  const [count, addCount] = React.useState(0)
  const [value, reduceValue] = React.useState(100)
  return (
    <>
      <p>
        {count}: <button onClick={() => addCount(count + 1)}>加1</button>
      </p>
      <p>
        {value}: <button onClick={() => reduceValue(value - 1)}>减1</button>
      </p>
    </>
  )
}

const root = ReactDOM.createRoot(document.getElementById('root'))
root.render(<App />)
